#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e3+100;
typedef long long LL;
typedef pair<LL,LL>P;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
class DetectSquares {
public:
    map<P,int>map1;
    DetectSquares() {
        map1.clear();
    }

    void add(vector<int> point) {
        int x=point[0];
        int y=point[1];
        map1[{x,y}]++;

    }

    long long count(vector<int> point) {
        long long ans=0;
        int nx=point[0];
        int ny=point[1];
        auto it1=map1.begin();
        for(it1;it1!=map1.end();it1++)
        {
            for(auto it2=next(it1);it2!=map1.end();it2++)
            {
                 P L =(*it1).first;
                 P R =(*it2).first;
                 if (L.first == R.first || L.second == R.second) continue;
                 if (!map1.count(L)) continue;
                 if (!map1.count(R)) continue;
                 if (abs(L.first-R.first)!=abs(L.second-R.second) ) continue;
                 if ( map1.count({L.first, R.second}) && map1.count({R.first, L.second}))
                 {
                     ans++;
                 }
            }
        }
        return ans/2;
    }
};
int main(void){

   	return 0;
}
